#include "../server/master.h"
#include "../server/slave.h"

#include <stdio.h>


static const char* _ms_create_error_str = "Master service can not initialize!\n";



int main(int argc, char **argv) {
	struct master* ms;
	printf("Somatis Inc. Data Ingest Server !\n");
	printf("All Rights Reserved!\n");
	printf("Version: 1.0!\n");
	printf("Debug Version!\n");
	/* initialize master component */
	ms = master_create( "master.cfg" );
	if( ms == NULL ) {
		fprintf(stderr,_ms_create_error_str);
		return -1;
	}
	/* the master component is initialized properly */
	printf("The master service has been initialized properly!\n");
	/* run the master component */
	master_run(ms);
	printf("The master service will run forever!");
	/* this is for debug or testing use ONLY */
	master_join_forever(ms);

	getchar();
}